# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models
from django.core.exceptions import ValidationError
# Create your models here.


class Document(models.Model):
    docfile = models.FileField(upload_to='documents/%Y/%m/%d')

    # def validate_file_extension(self):
    #     if not self.docfile.name.endswith('.jpg'):
    #         raise ValidationError(u'文件扩展名错误')



